/*    */ package com.zimbra.cs.account.ldap.upgrade;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.util.StringUtil;
/*    */ import com.zimbra.cs.account.Config;
/*    */ import com.zimbra.cs.account.ldap.LdapProv;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ import java.util.Set;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class BUG_57855
/*    */   extends UpgradeOp
/*    */ {
/*    */   void doUpgrade()
/*    */     throws ServiceException
/*    */   {
/* 33 */     upgradeZimbraGalLdapFilterDef();
/*    */   }
/*    */   
/*    */   void upgradeZimbraGalLdapFilterDef() throws ServiceException {
/* 37 */     Config config = this.prov.getConfig();
/*    */     
/* 39 */     String attrName = "zimbraGalLdapFilterDef";
/* 40 */     String[] addValues = { "email_has:(mail=*%s*)", "email2_has:(mail=*%s*)", "email3_has:(mail=*%s*)", "department_has:(ou=*%s*)" };
/*    */     
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/* 47 */     Set<String> curValues = config.getMultiAttrSet(attrName);
/*    */     
/* 49 */     Map<String, Object> attrs = new HashMap();
/* 50 */     for (String value : addValues) {
/* 51 */       if (!curValues.contains(value)) {
/* 52 */         StringUtil.addToMultiMap(attrs, "+" + attrName, value);
/*    */       }
/*    */     }
/*    */     
/* 56 */     modifyAttrs(config, attrs);
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/account/ldap/upgrade/BUG_57855.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */